Skip to content

feat(core): Data Collection - #5759

Draft
adinauer wants to merge 284 commits into
mainfrom
feat/data-collection
Draft

feat(core): Data Collection#5759
adinauer wants to merge 284 commits into
mainfrom
feat/data-collection

Conversation

@adinauer

@adinauer adinauer commented Jul 14, 2026

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Collection PR for the Data Collection stack. The individual PRs add the configuration model, resolution and compatibility bridge, external configuration, filtering, and integration enforcement.

Squash-merge this PR into main only after every stack PR has been merged into this branch using merge commits.

💡 Motivation and Context

Introduce the specification-defined dataCollection configuration while preserving existing sendDefaultPii behavior for users who do not opt into the new namespace.

Refs #5666

💚 How did you test it?

This collection branch contains only an empty commit. Each stack PR carries its own tests.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Merge the Data Collection stack into this branch in order, then squash-merge this PR into main.

#skip-changelog

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 48709b5

@sentry

sentry Bot commented Jul 14, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.55.0 (1) release

⚙️ sentry-android Build Distribution Settings

Let nullable Session Replay network options inherit matching Data Collection settings while preserving historical Replay defaults when Data Collection is absent. Keep explicit Replay options authoritative and apply the effective policies to OkHttp network details.

Co-Authored-By: Claude <noreply@anthropic.com>
Generate the default Android installation ID after programmatic configuration and only when the resolved user information policy allows it. Preserve custom distinct IDs and keep legacy behavior when Data Collection is absent.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
Make KeyValueCollectionBehavior JavaBean-bindable so Spring Boot properties correctly configure cookie, header, and query policies. Cover binding across all supported Spring Boot generations.

Co-Authored-By: Claude <noreply@anthropic.com>
adinauer and others added 7 commits August 10, 2026 14:37
Align the public Java API with the canonical Data Collection specification before release. The option has not shipped, so replace the old name without a compatibility alias.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
Keep the internal resolver and its tests aligned with the canonical public Data Collection option name.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
adinauer and others added 8 commits September 8, 2026 08:09
Bring the latest base branch fixes into this stacked branch.

Co-Authored-By: Claude <noreply@anthropic.com>
Bring the latest base branch fixes into this stacked branch.

Co-Authored-By: Claude <noreply@anthropic.com>
Bring the latest base branch fixes into this stacked branch.

Co-Authored-By: Claude <noreply@anthropic.com>
Bring the latest base branch fixes into this stacked branch.

Co-Authored-By: Claude <noreply@anthropic.com>
Bring the latest base branch fixes into this stacked branch.

Co-Authored-By: Claude <noreply@anthropic.com>
feat(http): [Data Collection 13] Apply cookie collection policy
feat(user): [Data Collection 14] Apply user information policy
…fo-options

fix(android): [Data Collection 15] Scope device info cache to SDK options
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

…replay-network-options

test(replay): [Data Collection 16] Keep Replay independent
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

1 similar comment
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

adinauer and others added 9 commits September 8, 2026 11:23
…nding

fix(spring): [Data Collection 18] Bind key-value policies
…installation-id

fix(android): [Data Collection 19] Preserve installation ID
…-description

fix(ktor): [Data Collection 20] Exclude query parameters from span descriptions
…-options

feat(core): [Data Collection 21] Add external configuration
…manifest

feat(android): [Data Collection 22] Add manifest configuration
…-urls

fix(core): [Data Collection 23] Support WebSocket URL parsing
…tches

fix(core): [Data Collection 24] Narrow utility exception handling
Describe Data Collection defaults, migration from sendDefaultPii, and the supported configuration mechanisms. Include examples for key-value filtering and HTTP body selection so users can adopt the new controls safely.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
Add the specification-defined filePaths option across programmatic, external, Spring Boot, and Android manifest configuration. Gate automatically captured File I/O paths through the resolved policy while preserving sendDefaultPii when Data Collection is absent.\n\nRefs #5666
Allow encoder-equipped Logback appenders to include original message
templates and parameters without relying on sendDefaultPii.

Keep sendDefaultPii as a temporary compatibility exception while Data
Collection replaces its other behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread sentry/api/sentry.api
public fun <init> ()V
public fun <init> (Z)V
public fun getCookies ()Lio/sentry/KeyValueCollectionBehavior;
public fun getDatabaseQueryData ()Ljava/lang/Boolean;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on this API (and the corresponding test) it looks like we have a mismatch between the types on the getters and setters.
The getters return a Boolean but the setters take a boolean which is inconsistent but also means the kotlin synthetic properties won't work.

adinauer and others added 5 commits September 10, 2026 06:19
feat(core): [Data Collection 25] Apply file path policy
Describe how encoder use, the integration opt-in, and the legacy PII option control original message data.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
Align the includeUnencodedMessage getter and setter names so Kotlin exposes the option as a mutable synthetic property.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
…unencoded-message

feat(logback): [Data Collection 26] Add unencoded message opt-in
Align nullable Boolean getters and setters so Kotlin exposes mutable synthetic properties. Allow callers to clear an explicit override by assigning null.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants